package com.kakarote.hrm.constant;

import lombok.Getter;

@Getter
public enum TeachingMethodEnum {

    ONE(1, "普通全日制"),
    TWO(2, "脱产"),
    THREE(3, "远程教育"),
    FOR(4, "自学考试"),
    FIVE(5, "函授"),
    SIX(6, "业余"),
    SEVEN(7, "非全日制");

    private Integer value;
    private String name;

    TeachingMethodEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getNameByValue(Integer value) {
        for (TeachingMethodEnum teachingMethodEnum : TeachingMethodEnum.values()) {
            if (teachingMethodEnum.getValue().equals(value)) {
                return teachingMethodEnum.getName();
            }
        }
        return "";
    }

}
